package edu.cth.scrabbit.shared;

import java.io.Serializable;

/**
 * A class that represents a player
 * @author Marcus Harryson, Anders Jonsson
 *
 */
public class Player implements Serializable {
	private static final long serialVersionUID = 706958250585323745L;
	protected String name;
	protected int position;
	protected int score;
	
	public Player() {
		
	}
	
	public Player(String nickname, int position, int score) {
		this.name = nickname;
		this.position = position;
		this.score = score;
	}
	
	public void setName(String name){
		this.name = name;
	}
	public int getPosition () {
		return position;
	}
	
	public void setPosition (int newPosition) {
		if (newPosition  <= 3 && newPosition >= 0) {
			position = newPosition;
		}
	}
	
	public String getName() {
		return name;
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}
	
}
